function [LabeledRanksTable] = Ddavid_get_feature_labeled_ranks_training(SampledTrueLabelTraining, K, KL, TrainingKNNList)

TrainingSize = size(SampledTrueLabelTraining, 1);
LabelSize = size(SampledTrueLabelTraining, 2);

TrainingLabeledSize = Ddavid_get_training_labeled_size(SampledTrueLabelTraining); % The number of the data with each label

LabeledRanksTable = ones(TrainingSize, LabelSize) * 1.0;

for LabelCounter = 1:LabelSize
    SampledTrueLabelTrainingOfSingleLabel = SampledTrueLabelTraining(:, LabelCounter);
    
    TrainingKNNLabeledList = Ddavid_get_knn_labeled_list(SampledTrueLabelTrainingOfSingleLabel, TrainingKNNList);
    
    for SizeCounter = 1:TrainingSize
        TempList = find(TrainingKNNLabeledList(SizeCounter, :) == 1);
        TempListSize = TrainingLabeledSize(LabelCounter) - 1; % TempListSize is equal to (the number of instances with the label) - 1
        if(TempListSize >= KL)
            LabeledRanksTable(SizeCounter, LabelCounter) = 1.0 - TempList(KL) / (TrainingSize + 1.0);
        end
    end
end
